NODE2BAY.EXE V1.3 (c) G4IDE, June 1997 -------------------------------------- This file contains some very useful information. The last paragraph might be just as interesting and useful as the first, so please try and read it all! What It Does ------------ NODE2BAY.EXE acts as an interface between G8BPQ's BPQCODE node software and G7JJF's BAYDRV Baycom driver for Windows - that is why it is called NODE2BAY. It allows Windows packet applications which support BPQ (such as WinPack) to be used with BAYDRV and therefore with a Baycom modem. NODE2BAY is not in itself a Baycom driver, BAYDRV.VXD is the driver, which is (c) Jon Welch, G7JJF. If you have any problems using BAYDRV in conjunction with NODE2BAY.EXE, please contact myself, DO NOT contact G7JJF. BAYDRV is a very clever piece of software and I would like to thank G7JJF for giving his permission for it to be used in this application. Getting Started --------------- My suggested route to using a Baycom modem with BPQ, NODE2BAY, BAYDRV and Windows is as follows:- 1. Make sure your modem works by using it in DOS with a DOS packet program that supports it, such as the Baycom software. 2. Learn how to use BPQ - there's no easy way, you simply have to read the docs! Run BPQ and the modem in DOS by using something like BPQAX25 as an interface between the modem and BPQ. 3. If you've successfully made it this far, follow the instructions in the next section. If you skip any of the above steps and then find you have problems with the Windows setup, you won't have a clue as to what is not working. Installation ------------ Note that, to use BPQ underneath Windows, you need version 4.08a or later. 1. Put BAYDRV.VXD and NODE2BAY.EXE in your WINPACK directory. 2. Edit BPQCFG.TXT in your BPQ directory and put in a port entry something like this:- PORT ID=BAYCOM TYPE=EXTERNAL CHANNEL=A INTLEVEL=96 MAXFRAME=2 FULLDUP=0 FRACK=7000 RESPTIME=2000 RETRIES=10 PACLEN=120 QUALITY=10 UNPROTO=ID ENDPORT 3. Run BPQCFG. 4. Edit AUTOEXEC.BAT and put at the end (or before any possible WIN command) something like:- REM the next like is typical for a *standard* COM1. C:\WINPACK\NODE2BAY.EXE -I4 -B3f8 -i60 -dC:\WINPACK\BAYDRV.VXD PAUSE CD \BPQ BPQCODE CD \ NOTE - the "-I", "-B", "-i" and "-d" are case sensitive. If you are using the modem on a *standard* COM2, then use:- C:\WINPACK\NODE2BAY.EXE -I3 -B2f8 -i60 -dC:\WINPACK\BAYDRV.VXD The "-i" parameter is the software interrupt to be used and must match the INTLEVEL in BPQCFG.TXT. NOTE - INTLEVEL is in decimal, "-i" is in hex, so "-i60" matches "INTLEVEL=96". This may seem rather strange, but I have kept the NODE2BAY arguments as compatible as possible with the DOS BPQAX25 driver. Software interrupts may be used by other applications. If you are loading other drivers in AUTOEXEC.BAT or CONFIG.SYS, particularly anything like an ethernet packet driver, it is up to you to make sure that nothing elses is using the software interrupt you select. You MUST use the correct IRQ (the -I argument) and the correct address (the -B argument) for the port on which you are using the modem. DON'T try and use a port that shares an IRQ if there is going to be an active device on the other port using the same IRQ. A common PC setup is that COM1 and COM3 use IRQ4, COM2 and COM4 use IRQ3. If you have another active device on a port using the same IRQ as the one you are using with this driver, you will get in a big mess! 5. Restart the PC - when the PAUSE in AUTOEXEC.BAT occurs the screen should be displaying the load message from NODE2BAY - check that the parameters look ok. 6. Run Windows. 7. Start WinPack and select "Options", "Comms Setup", "Host mode BPQ". If you get error messages then you probably haven't put the BPQ files BPQCODE.386 and BPQDLL.DLL in WINDOWS\SYSTEM. If, when you started WinPack, it was set up to use a normal TNC on the port where you now have the modem, you should restart the PC, because WinPack may have interfered with the port (see "Known Problems/Limitations", point 3, below). 8. It should all now work! NODE2BAY Options -------------- The full list of possible command line arguments for NODE2BAY is as follows:- -i default 60h (96 decimal) -I default 4 (COM1) -B default 3F8h (COM1) -b default 1200 (should never need changing) -c default 3. The options are:- 0 - ignore channel activity. 1 - use DCD input from modem to detect channel activity. A standard Baycom modem does not support this. 2 - Use any sort of noise input to detect channel acitvity - use with squelched rig. 3 - 'Soft DCD'. Analyse the incoming noise to detect packet activity - use with an unsquelched rig. -T default 50. A larger number makes it less likely that noise will be detected as valid packet activity. -s default 120. -p default 64. -h default 360 = 300 msec. -t default 24 = 20 msec. -w default 16. This is an internal parameter used in the decoding of received frames in BAYDRV.VXD. Try 32 or 64 if reception seems poor. -l default is '1', which makes NODE2BAY attempt to load BAYDRV.VXD when Windows starts. If you put '0' then it assumes the VXD has been loaded in SYSTEM.INI. (If you have WinTNC installed on your PC, you should use '-l0'). -d default "\WINDOWS\SYSTEM\BAYDRV.VXD". So, if you put BAYDRV.VXD in WINDOWS\SYSTEM and always start Windows from the drive where your WINDOWS directory is, you don't need to use the "-d" argument. If It Doesn't Work ------------------ 1. Check your AUTOEXEC.BAT and BPQCFG.TXT entries again. Make sure that the port address and IRQ you have specified are correct for the port you are using - if necessary check the jumpers on the I/O card. Make sure that INTLEVEL in the BPQ port definition matches the NODE2BAY "-i" parameter, noting the above comments that one is decimal and the other is hex. 2. If you have a scope available, check the signal on the TXD pin of the COM port (pin 2 on a 25 pin connector, pin 3 on a 9 pin connector) after Windows has started. It should be an asymmetric square wave, mainly +ve, with a period of just over 80 msecs. If you have an RS232 "mini tester" (a thing with LEDs on it that plugs into a serial port - very useful) the TXD LED should flicker rapidly. If there is no activity on that pin, it almost certainly means that the address and IRQ you are passing to NODE2BAY are wrong. 3. If you get a message when Windows starts saying it can't find BAYDRV.VXD, check the "-d" parameter for NODE2BAY. 4. If you get a message when Windows starts saying it can't find BPQCODE.386, check the following:- BPQCODE.386 must be in a directory called \WINDOWS\SYSTEM on the drive from which you start Windows. It doesn't matter if your Windows is in a directory called WIN31 or WIN95, BPQCODE.386 MUST be in \WINDOWS\SYSTEM. If necessary, make the directory just for this one file. Also, you MUST start Windows from the drive on which this directory lives. This is because the path to BPQCODE.386 is hard-coded into BPQCODE.EXE. 5. If the modem transmits ok but it will not receive, or it receives very poorly, the following might help:- Originally I found on both my DX2 and P120 PCs that the Baycom driver worked a lot better on some ports than on others. It just didn't seem to want to receive on some ports and all the ports that gave problems had 16550 (buffered) UARTs. I had seen comments from other people about problems with Baycom modems and 16550s, but I just could not understand why there should be such a problem. Eventually I found the solution to my own problems - it might not work for everyone, but if it works on two of my PCs then I'm sure there will be a lot of other people who will find that it works! Both my Baycom modems are built on boards from a well known UK supplier of PCBs and kits (Badger Boards). They drive the CTS output direct from the 74HC04, and the low voltage on the output is about +0.5V - it never swings negative. That may be in spec for TTL, but it's way out of spec for RS232. I have another genuine Baycom board, which I have never got round to building, that drives the CTS output via a PNP transistor which ensures that the output voltage can swing negative. I modded both my boards to the Baycom design and the driver then worked perfectly! The implication of this is that the problem is not caused by the 16550 or its emulation, but by the line receiver arrangements being more in spec than those employed with older UARTs. Here's the mod - I'm not too good at ASCII schematics, so I hope it makes sense! (The original circuit has a 2k2 from pin 6 on the 74HC04 to pin 8 on the 9 pin 'D'). "+5V" is the output from the regulator, which goes to pin 1 on the TCM3105, pin 14 on the 74HC04, etc. RTS (pin 7 on 9 pin 'D') | < < 10k < |--/\/\/\--- CTS (pin 8 on 9 pin 'D') C| 2k2 10k / 74HC04 pin 6 ---/\/\/\--|B BC213L or similar *PNP* transistor \ E| | +5V Known Problems/Limitations -------------------------- 1. I have used BPQ/NODE2BAY/BAYDRV with the following PCs:- P120 with Win95 and 32Mb of RAM. P120 with Windows for Workgroups and 32Mb of RAM. DX4/100 with Win95 and 12Mb RAM. DX2/66 with Win95 and 16Mb RAM (most testing done on this system). I tried to use it with the DX2 and Windows for Workgroups 3.11, but reception was very poor. That could well be a problem with this particular PC - when running Windows for Workgroups it always gave problems when I tried to use TF host mode with WinPack. I don't have any PCs with either Windows 3.1 or 3.11 on them. I don't have anything less than a DX2/66. I don't have any PCs with less RAM than the above systems. In this type of application, where a large number of hardware interrupts are being serviced, Win95 is definitely better than Windows 3.1x. 2. BAYDRV does a lot of work and services a huge number of interrupts. It hits the performance of the PC. With BPQ also having an effect on performance, the DX2 feels a bit "clunky". 3. When the driver is using a COM port, another Windows app can still open the port - it is, of course, up to you as the user of the PC to make sure that doesn't happen! You can if you wish "hide" the port from Windows, see the WinPack help file - "Support for BPQ", "WinPack and BPQ" for information on how to do this. Using More Than One Baycom Modem -------------------------------- During testing on the DX2, I have been running two BPQ ports with Baycom modems quite successfully. If you want to give it a try, do the following:- 1. Create a second port entry in BPQCFG.TXT, more or less the same as the first, but use a different INTLEVEL - 97 should be ok. 2. Load a second copy of NODE2BAY.EXE in AUTOEXEC.BAT, specifying a different COM port and whatever INTLEVEL you have used in BPQCFG.TXT for the second port. For example:- C:\WINPACK\NODE2BAY.EXE -I3 -B2f8 -i61 -l0 The "-l0" tells this copy of NODE2BAY.EXE not to try and load BAYDRV.VXD when Windows starts. However, it isn't really needed, because a second copy will detect that a previous copy has been loaded and will never attempt to load the VXD. 3. You should now have two Baycom ports! However, how well they work depends a lot on the speed of the PC. For The Technically Minded -------------------------- NODE2BAY acts as an external port driver for BPQCODE using the software interrupt specified in INTLEVEL in BPQCFG.TXT and the "-i" NODE2BAY parameter. It provides an interface (or shim) between BPQCODE and BAYDRV, which is the Baycom driver. Until Windows starts up, NODE2BAY provides a dummy port on which nothing can be sent or received. When NODE2BAY detects that Windows is starting, it requests Windows to load BAYDRV.VXD (unless you have specified the "-l0" parameter). About 10 seconds after Windows initialisation is complete, NODE2BAY looks for the loaded copy of BAYDRV, if it finds it then it initialises a port according to the various command line parameters. If initialisation is successful, the port becomes active. If NODE2BAY can't find BAYDRV or the initialisation fails, the port remains dummied out. Because BAYDRV is a VxD, it runs in privilege ring 0, which means that it is able to service hardware interrupts almost as quickly as an application running in DOS. This gets rid of the problems of interrupt latency which stop drivers such as BPQAX25 working effectively underneath Windows. Disclaimer, Etc. ---------------- BAYDRV.VXD and NODE2BAY.EXE are supplied on the basis that if you can get them to work, I'm happy for you, if you mess up your PC in the process, don't blame me! In other words, you use them entirely at your own risk. You may use this driver combination with programs other than WinPack. BAYDRV.VXD is (c) Jon Welch, G7JJF. NODE2BAY.EXE is (c) Roger Barker, G4IDE. History ------- V1.1, 09 Jun 1997 - first public release. V1.2, 12 Jun 1997 - Renamed from BPQJJF.EXE to NODE2BAY.EXE. This was to try and make sure that people at least read the first paragraph of the documentation to find out to whom they should direct their questions! (With half of two well known callsigns in the title, it was too easy to start hassling the wrong people! ;-) The driver does not install if a COM port doesn't exist at the specified address. The start up info now includes whether the port has a 16550 (buffered) UART. Minor changes to documentation. V1.3, 20 Jun 1997 - The driver does not install if BAYDRV.VXD cannot be found. A message is displayed when Windows starts up if NODE2BAY asks Windows to load BAYDRV.VXD. With previous versions, if you exited from Windows and then restarted Windows without rebooting the PC, NODE2BAY did not reinitialise correctly. Now fixed. A check added to make sure that it is Windows starting and not a DOS 286 extender (highly unlikely!) Roger Barker, G4IDE roger@peaksys.demon.co.uk http://www.peaksys.demon.co.uk G4IDE@GB7OAR.#16.GBR.EU G8MZX@GB7SKG.#15.GBR.EU 20 June 97